

        <g:set var="entityName" value="${message(code: 'courseware.label', default: 'Courseware')}" />
            <g:form method="post" >
                <g:hiddenField name="id" value="${coursewareInstance?.id}" />
                <g:hiddenField name="version" value="${coursewareInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="title"><g:message code="courseware.title.label" default="Title" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: coursewareInstance, field: 'title', 'errors')}">
                                    <g:textField name="title" maxlength="250" value="${coursewareInstance?.title}" />
                                </td>
                            </tr>
                             <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="attachments">
                                    <a href="javascript:"  class="uploadButton"><g:message code="article.attachments.label" default="attachments" /></a></label>
                                </td>
                                <td valign="top" class="value">
                                    <div id="messages"></div>
                                    <div id="errors"></div>
                                    <div id="attachmentList">
                                    <g:each in="${coursewareInstance?.attachments}" var="attachment">
                                     <div class='filename' id="${attachment.id}"><a href='javascript:' class='showAttachment'>${attachment.name}(${Math.round(attachment.size/1024)}k)</a>
                                     <input type='hidden' name='attachments' value="${attachment.id}">
                                     <a href='javascript:' class='deleteAttachment'><g:message code="default.button.delete.label" default="删除" /><g:message code="article.attachments.label" default="attachments" /></a>
                                     </div>
                        
                                    </g:each>
			
                                    </div> 
                                </td>
                            </tr> 
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="content"><g:message code="courseware.content.label" default="Content" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: coursewareInstance, field: 'content', 'errors')}">

                                    <ckeditor:config    height="300px"    width="80%" />
                                    <ckeditor:editor name="content">${coursewareInstance?.content}</ckeditor:editor>                                </td>
                            </tr>
                         
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                </div>
            </g:form>
